package com.qf.controller;

import com.qf.entity.TbThesisproposal;
import com.qf.service.TbThesisproposalService;
import com.qf.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.annotation.MultipartConfig;
import javax.servlet.http.HttpSession;

/**
 * @author 10202
 * @version V1.0
 * @Project management-system
 * @Package com.qf.controller
 * @Date 2023/5/21 10:37
 */
@RestController
@RequestMapping("/thesisproposal")
@MultipartConfig
public class ThesisproposalController {

    @Autowired
    private TbThesisproposalService tbThesisproposalService;

    @PostMapping("/sendthesisproposal")
    public Result sendthesisproposal(@RequestParam(value = "ofile", required = false) MultipartFile file, String oname, Integer studentId, HttpSession session){


        return tbThesisproposalService.sendthesisproposal(file, oname, studentId, session);

    }
}
